/**
 * Copyright &copy; 2012-2016 <a href="https://istep.lczyfz.com">Istep</a> All rights reserved.
 */
package com.lczyfz.istep.modules.scene.dao;

import com.lczyfz.istep.common.persistence.CrudDao;
import com.lczyfz.istep.common.persistence.annotation.MyBatisDao;
import com.lczyfz.istep.modules.scene.entity.SceneCtfEnvironmentInstance;
import com.lczyfz.istep.modules.scene.entity.SceneEnvironmentInstance;
import com.lczyfz.istep.modules.scene.entity.SceneVmTemplate;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 虚拟机模板管理DAO接口
 * @author dh
 * @version 2017-04-06
 */
@MyBatisDao
public interface SceneVmTemplateDao extends CrudDao<SceneVmTemplate> {
    void  vmNetworkInsert (String vmTemplateId,String networkId,String environmentId);
    void  vmPortInsert (String vmTemplateId,String portId);
    void  vmSecurityGroupInsert (String vmTemplateId,String sgId);
    List<SceneVmTemplate> findVMListByEnvironmentId(@Param("DEL_FLAG_NORMAL")String DEL_FLAG_NORMAL,@Param("id")String id);
    List<SceneEnvironmentInstance> findVmMonitorList(SceneEnvironmentInstance sceneEnvironmentInstance);
    List<SceneCtfEnvironmentInstance> findCtfVmMonitorList(SceneCtfEnvironmentInstance sceneCtfEnvironmentInstance);
    SceneVmTemplate viewResourceDetail(@Param("id")String id);
    SceneVmTemplate viewCtfResourceDetail(@Param("id")String id);
    void vmMonitorDelete(@Param("instanceId")String instanceId,@Param("vmTemplateId")String vmTemplateId);


    SceneVmTemplate findVmTemplateByName(@Param("name")String name,@Param("DEL_FLAG_NORMAL")String DEL_FLAG_NORMAL);

}